<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./js/react.development.js"></script>
  <script src="./js/react-dom.development.js"></script>
</head>
<body>
  <div id="root" class="aaa"></div>

  <script>
    /* 3. 创建一个React元素  不是DOM元素*/
    const element = React.createElement(
      'div',
      null, // 没有标签属性
      // React.createElement('h2', {title: '武汉疫情'}, '你关注的武汉疫情'),
      // React.createElement('p', null, 'aaaaaa')
    )

    console.log(element)

    /* 4. 将React元素渲染到页面 
    */
    ReactDOM.render(element, document.getElementById('root'))

    /* 结论: 使用JS的代码创建虚拟DOM比较麻烦 */
  </script>
</body>
</html>